# -*- coding: latin-1 -*-

class insufficientFunds(Exception):
    value = "Sorry, insufficient funds: €%6.2f"

class BankAccount:
    def __init__(self, InitialFunds):
	self.balance = InitialFunds
	print "The account was created with %5.2f Euros" % self.balance

    def deposit(self, value):
	self.balance = self.balance + value

    def lifting(self, value):
	if self.balance >= value:
	    self.balance = self.balance - value
	else:
	    raise insufficientFunds, insufficientFunds.value % self.balance

    def checkBalance(self):
	return self.balance

    def transfer(self, value, account):
	try:
	    self.lifting(value)
	    account.deposit(value)
	except insufficientFunds:
	    print insufficientFunds.value

class SavingsAccount(BankAccount):
    def deposit(self, value):
	BankAccount.deposit(self, value)
	self.balance = self.balance * 1.03 #Interest rate

class MortgageAccount(BankAccount):
    def __init__(self, InitialFunds):
	BankAccount.__init__(self, InitialFunds)
	self.tax = 3 #euros of tax for each lifting

    def lifting(self, value):
	BankAccount.lifting(self, value+self.tax)




